package com.drakulo.games.ais.core.delayed;

import com.drakulo.games.ais.ui.component.HexagonMap;

/**
 * Represents an exploration mission (of a planet or a galaxy zone)
 * 
 * @author Drakulo
 */
public class HexagonMapAction extends DelayedAction {
	/** The linked map */
	private HexagonMap map;
	/** The linked index */
	private int index;
	/** Exploration flag */
	private boolean exploration;

	public HexagonMapAction(int duration, HexagonMap map, int index) {
		super(duration, 0);
		this.map = map;
		this.index = index;
		this.exploration = true;
		
		this.setCallback(new Runnable() {
			
			@Override
			public void run() {
				HexagonMapAction.this.map.explore(HexagonMapAction.this.index);
			}
		});
	}

	public HexagonMap getMap() {
		return map;
	}

	public void setMap(HexagonMap map) {
		this.map = map;
	}

	public int getIndex() {
		return index;
	}

	public void setIndex(int index) {
		this.index = index;
	}

	public boolean isExploration() {
		return exploration;
	}

	public void setExploration(boolean exploration) {
		this.exploration = exploration;
	}

	
}
